﻿CREATE PROCEDURE [dbo].[yaf_watchforum_add](
                @UserID  INT,
                @ForumID INT)
AS
    BEGIN
        INSERT INTO yaf_WatchForum
                   (ForumID,
                    UserID,
                    Created)
        SELECT @ForumID,
               @UserID,
               Getdate()
        WHERE  NOT EXISTS (SELECT 1
                    FROM   yaf_WatchForum
                    WHERE  ForumID = @ForumID
                    AND UserID = @UserID)
    END


